package com.vehicle.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;


@Component
@FeignClient("menu-service")//模块名称
public interface MenuFeign {

    //根据用户id获取角色id
    @GetMapping("/role-user/getRoleId1/{userId}")
    public Integer getRoleIdByUser(@PathVariable("userId") Integer userId);

    //根据管理员id获取角色id
    @GetMapping("/role-user/getRoleId2/{adminId}")
    public Integer getRoleIdByAdmin(@PathVariable("adminId") Integer adminId);

    //根据角色id获取角色名称
    @GetMapping("/role/getRoleName/{roleId}")
    public String getRoleNameById(@PathVariable("roleId") Integer roleId);
}
